////
//
/// \file ./include/inc/parser/inc/parser/float_type_node.hpp
//
//  Copyright 2007, 2008 Chandler Carruth
//
//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
//  use this file except in compliance with the License.  You may obtain a copy
//  of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
//  License for the specific language governing permissions and limitations
//  under the License.
//
////

#ifndef inc_parser_float_type_node_header
#define inc_parser_float_type_node_header

#include <string>

#include <boost/scoped_ptr.hpp>

#include <inc/parser/parse_tree_node.hpp>

namespace inc {
namespace parser {

class ImmediateNode;
class WSParser;

/// \brief Floating point type parse node
/// \author Chandler Carruth
/// \date 2007.08.12
///
/// This parses the floating point type specification node. It handles floating
/// point numbers of an arbitrary precision cleanly. According to the IEEE
/// standards and extensions there of, all floating point numbers are signed.
/// Also, the precisions available is highly restricted to the IEEE standard
/// floating point precisions and those extensions supported on the target.
/// Most commonly, 32bit and 64bit will be sufficient and supported.

class FloatTypeNode : public ParseTreeNode
{
public:
  FloatTypeNode();
  virtual ~FloatTypeNode();

  virtual bool parse( const iterator& first,
                      const iterator& last,
                      iterator& last_parsed );

  virtual ImmediateNode* get_precision() const;

private:
  boost::scoped_ptr<ImmediateNode> precision;

  boost::scoped_ptr<WSParser> ws;
};

} //  end parser namespace
} //  end inc namespace
#endif  //  inc_parser_float_type_node_header
